package ly.jobdu;

import java.util.Scanner;

public class Q1031XXX {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int num = scanner.nextInt();
			if (num == 0) {
				break;
			} else {
				xxx(num);
			}
		}
	}

	public static void xxx(int num) {
		int count = 0;
		while (num > 1) {
			if (num % 2 == 0) {
				num = num / 2;
			} else if (num % 2 == 1) {
				num = 3 * num + 1;
				num = num / 2;
			}
			count++;
		}
		
		System.out.println(count);
	}
}
